<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>七牛云OSS图片上传完全指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            position: relative;
            overflow: hidden;
        }
        
        .hero-gradient::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: float 20s ease-in-out infinite;
        }
        
        @keyframes float {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            50% { transform: translate(-30px, -30px) rotate(180deg); }
        }
        
        .content-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }
        
        .content-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
        }
        
        .feature-icon {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .step-number {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            font-weight: bold;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }
        
        pre {
            background: #1e1e1e;
            color: #d4d4d4;
            border-radius: 12px;
            padding: 1.5rem;
            overflow-x: auto;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }
        
        code {
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        }
        
        .inline-code {
            background: #f3f4f6;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            color: #6366f1;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.9em;
        }
        
        .section-title {
            position: relative;
            display: inline-block;
            margin-bottom: 2rem;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 60px;
            height: 4px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
        
        .floating-icon {
            animation: float-icon 3s ease-in-out infinite;
        }
        
        @keyframes float-icon {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <div class="hero-gradient text-white py-20 px-6 relative">
        <div class="max-w-6xl mx-auto relative z-10">
            <div class="text-center">
                <i class="fas fa-cloud-upload-alt text-6xl mb-6 floating-icon"></i>
                <h1 class="text-5xl font-bold mb-4" style="font-family: 'Noto Serif SC', serif;">
                    七牛云OSS图片上传完全指南
                </h1>
                <p class="text-xl opacity-90 max-w-3xl mx-auto leading-relaxed">
                    掌握云存储技术，让你的应用轻松管理海量图片资源。本指南将带你深入了解七牛云对象存储服务，实现高效、可靠的图片上传功能。
                </p>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="max-w-6xl mx-auto px-6 py-12">
        <!-- Introduction Card -->
        <div class="content-card rounded-2xl p-8 mb-8">
            <p class="text-lg leading-relaxed text-gray-700 indent-8">
                在现代应用开发中，图片上传是一个常见的需求，为了更好地管理和存储这些图片，云存储服务成为了不可或缺的一部分。七牛云对象存储（Qiniu Cloud Object Storage，简称七牛云OSS）是一项强大的云存储解决方案。本文将向你展示如何将项目中的图片上传到七牛云OSS，并提供详细的步骤和相关介绍。
            </p>
        </div>

        <!-- 七牛云OSS简介 -->
        <div class="content-card rounded-2xl p-8 mb-8">
            <h2 class="section-title text-3xl font-bold text-gray-800 mb-6">
                <i class="fas fa-info-circle mr-3 feature-icon"></i>七牛云OSS简介
            </h2>
            <p class="text-lg leading-relaxed text-gray-700 mb-6 indent-8">
                七牛云OSS是一个旨在帮助开发者存储和管理大量图片、视频和其他数据的云存储服务。它以高可用性、高可靠性和低成本的特点受到了广泛欢迎。
            </p>
            
            <div class="grid md:grid-cols-2 gap-6 mt-8">
                <div class="bg-gradient-to-br from-purple-50 to-indigo-50 p-6 rounded-xl hover:shadow-lg transition-all">
                    <div class="flex items-start">
                        <i class="fas fa-globe text-3xl feature-icon mr-4 mt-1"></i>
                        <div>
                            <h3 class="font-bold text-lg mb-2 text-gray-800">全球加速</h3>
                            <p class="text-gray-600">七牛云OSS在全球范围内部署了多个数据中心，可为用户提供低延迟、高速传输的服务。</p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-gradient-to-br from-blue-50 to-cyan-50 p-6 rounded-xl hover:shadow-lg transition-all">
                    <div class="flex items-start">
                        <i class="fas fa-shield-alt text-3xl feature-icon mr-4 mt-1"></i>
                        <div>
                            <h3 class="font-bold text-lg mb-2 text-gray-800">安全可靠</h3>
                            <p class="text-gray-600">七牛云OSS支持数据冗余和多重备份，保障用户数据的安全性和可靠性。</p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-gradient-to-br from-green-50 to-emerald-50 p-6 rounded-xl hover:shadow-lg transition-all">
                    <div class="flex items-start">
                        <i class="fas fa-code text-3xl feature-icon mr-4 mt-1"></i>
                        <div>
                            <h3 class="font-bold text-lg mb-2 text-gray-800">强大的API</h3>
                            <p class="text-gray-600">七牛云OSS提供了丰富的API接口，使得开发者可以轻松地在应用中集成文件上传、下载、管理等功能。</p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-gradient-to-br from-yellow-50 to-orange-50 p-6 rounded-xl hover:shadow-lg transition-all">
                    <div class="flex items-start">
                        <i class="fas fa-coins text-3xl feature-icon mr-4 mt-1"></i>
                        <div>
                            <h3 class="font-bold text-lg mb-2 text-gray-800">低成本</h3>
                            <p class="text-gray-600">七牛云OSS提供灵活的计费方式，用户只需按照实际使用付费。</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 上传流程图 -->
        <div class="content-card rounded-2xl p-8 mb-8">
            <h2 class="section-title text-3xl font-bold text-gray-800 mb-6">
                <i class="fas fa-project-diagram mr-3 feature-icon"></i>上传流程概览
            </h2>
            <div class="mermaid">
                graph LR
                    A[开始] --> B[注册七牛云账号]
                    B --> C[创建存储空间]
                    C --> D[获取访问密钥]
                    D --> E[集成SDK]
                    E --> F[实现上传逻辑]
                    F --> G[处理上传结果]
                    G --> H[完成]
                    
                    style A fill:#667eea,stroke:#fff,stroke-width:2px,color:#fff
                    style H fill:#764ba2,stroke:#fff,stroke-width:2px,color:#fff
                    style B fill:#f3f4f6,stroke:#667eea,stroke-width:2px
                    style C fill:#f3f4f6,stroke:#667eea,stroke-width:2px
                    style D fill:#f3f4f6,stroke:#667eea,stroke-width:2px
                    style E fill:#f3f4f6,stroke:#667eea,stroke-width:2px
                    style F fill:#f3f4f6,stroke:#667eea,stroke-width:2px
                    style G fill:#f3f4f6,stroke:#667eea,stroke-width:2px
            </div>
        </div>

        <!-- 上传步骤 -->
        <div class="content-card rounded-2xl p-8 mb-8">
            <h2 class="section-title text-3xl font-bold text-gray-800 mb-6">
                <i class="fas fa-list-ol mr-3 feature-icon"></i>上传图片的步骤
            </h2>
            <p class="text-lg text-gray-700 mb-8">下面是将项目中的图片上传到七牛云OSS的详细步骤：</p>
            
            <div class="space-y-6">
                <div class="flex items-start">
                    <div class="step-number mr-4">1</div>
                    <div class="flex-1">
                        <h3 class="font-bold text-lg mb-2">注册七牛云账号并创建存储空间</h3>
                        <p class="text-gray-600">首先，你需要在七牛云官网上注册一个账号，然后创建一个存储空间，用于存放上传的图片。</p>
                    </div>
                </div>
                
                <div class="flex items-start">
                    <div class="step-number mr-4">2</div>
                    <div class="flex-1">
                        <h3 class="font-bold text-lg mb-2">获取访问密钥</h3>
                        <p class="text-gray-600">在七牛云控制台中，获取你的访问密钥（Access Key和Secret Key）。这些密钥将用于授权你的应用访问七牛云OSS。</p>
                    </div>
                </div>
                
                <div class="flex items-start">
                    <div class="step-number mr-4">3</div>
                    <div class="flex-1">
                        <h3 class="font-bold text-lg mb-2">引入七牛云SDK</h3>
                        <p class="text-gray-600">在你的项目中引入七牛云提供的SDK，以便在代码中使用相关功能。</p>
                    </div>
                </div>
                
                <div class="flex items-start">
                    <div class="step-number mr-4">4</div>
                    <div class="flex-1">
                        <h3 class="font-bold text-lg mb-2">实现图片上传逻辑</h3>
                        <p class="text-gray-600">使用SDK提供的接口，实现将图片上传到七牛云OSS的存储空间中。这通常涉及到生成上传凭证、调用上传方法等。</p>
                    </div>
                </div>
                
                <div class="flex items-start">
                    <div class="step-number mr-4">5</div>
                    <div class="flex-1">
                        <h